<?php

namespace App\Http\Requests;

class AttendanceUpdateRequest extends Request
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
       return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'late'=> 'integer',
            'early'=> 'integer',
            'absenteeism'=> 'integer',
            'business'=> 'string',
            'sick'=> 'string',
            'overtime'=> 'string',
            'public'=> 'integer',
            'remark'=>'string',
            'chuchai'=> 'integer',
            'qita'=> 'integer',
        ];
    }



    public function FillData()
    {

        return [
            'late'=>(int)$this->late,
            'early'=> (int)$this->early,
            'absenteeism'=>(int)$this->absenteeism,
            'business'=> (float)$this->business,
            'sick'=> (float)$this->sick,
            'overtime'=> (int)$this->overtime,
            'public'=> (int)$this->public,
            'remark'=>(string)$this->remark,
            'time'=>(int)$this->time,
            'chuchai'=> (int)$this->chuchai,
            'qita'=> (int)$this->qita,
        ];
    }
}
